The present technique relates to an apparatus and method for determining a recovery point from which to resume instruction execution following handling of an unexpected change in instruction flow.
When designing modern data processing systems, a general aim is to increase performance and/or reduce power consumption, whilst maintaining correct operation in respect of the software executing on the processor. “Correct operation” is often at odds with the other goals of increased performance and low power consumption, but is a necessity.
The Instruction Set Architecture (ISA) is the part of the processor that is visible to the programmer or compiler writer, and the ISA serves as the boundary between software and hardware. The ISA is typically defined such that any software can be written using the instructions of the instruction set defined by the ISA, and as a result the requirements and constraints specified by the ISA need to ensure correct operation for any software that may be written to execute on the processor.
One of the constraints defined by the ISA is a default constraint for determining a recovery point from which to resume instruction execution following an unexpected change in instruction flow. For example, various faults or interrupts may cause the execution of the software to be temporarily halted whilst one or more exception routines are executed, and it then needs to be determined where to restart execution of the software following completion of the exception routine. Similarly, a branch resteer mechanism may be triggered when it is determined that there has been a branch misprediction, and again it needs to be determined where instruction execution should be resumed from as a result of that branch resteer. The ISA will define recovery points for these scenarios with the aim of ensuring correct execution behaviour for any software that may be written to execute on the processor.
However, such constraints can significantly impact the processor's ability to seek to obtain performance and/or power consumption improvements when executing software.